/**/
$().ready(function () {
	initTela();
	$(window).resize(function(){
		initTela();
	});
});

function initTela() {
	var heightWindow = $(window).height() - 4;
	heightWindow = heightWindow > 700 ? heightWindow : 700;
	$("#custom-body").height(heightWindow - ($("#custom-header").height() + $("#custom-footer").height()));

	var widthWindow = $(window).width() - 2;
	var marginLeftBody = ((widthWindow - $("#custom-body-content").width()) / 2) - $("#custom-body-menu").width();
	marginLeftBody = marginLeftBody > 0 ? marginLeftBody : 0;
	$("#custom-body-content").css("margin-left", marginLeftBody);
}